import App from './App'
import uvUiTools from "@/uni_modules/uv-ui-tools";
import {useRequest} from '@/utils/request'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
Vue.use(uvUiTools)
useRequest(Vue)
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import {useTheme} from "@/hooks/useTheme";
export function createApp() {
  const app = createSSRApp(App)
  useRequest(app)
  app.use(uvUiTools)

  const {setTheme} = useTheme()
  setTheme()
  return {
    app
  }
}
// #endif
